import axios from 'axios'
import Vue from 'vue'
//配置类
axios.defaults.baseURL = 'http://47.106.85.120:8081'
axios.defaults.timeout = 5000

axios.loadData = async function (url) {//整体是异步
  const resp = await axios.get(axios.defaults.baseURL + url)   //get请求同步
  return resp
}
axios.loadDataByJson = async function (url, jsonData) {
  const resp = await axios.post(axios.defaults.baseURL + url, jsonData)
  return resp
}
Vue.prototype.$http = axios
Vue.prototype.imgUrl="http://47.106.85.120:80/img/"
Vue.prototype.imgUrl1="http://47.106.85.120:80/"
